package com.holdtime.jtt809dataservice.business.hd.entity.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.holdtime.jtt809dataservice.business.hd.entity.DsParentPlatformDO;
import com.holdtime.jtt809dataservice.business.hd.model.vo.DsParentPlatformPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 上级平台信息; Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface DsParentPlatformMapper extends BaseMapperX<DsParentPlatformDO> {

    default PageResult<DsParentPlatformDO> selectPage(DsParentPlatformPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DsParentPlatformDO>()
                .eqIfPresent(DsParentPlatformDO::getParentPlatformIp, reqVO.getParentPlatformIp())
                .eqIfPresent(DsParentPlatformDO::getParentPlatformPort, reqVO.getParentPlatformPort())
                .eqIfPresent(DsParentPlatformDO::getUserId, reqVO.getUserId())
                .eqIfPresent(DsParentPlatformDO::getPasswd, reqVO.getPasswd())
                .eqIfPresent(DsParentPlatformDO::getJrm, reqVO.getJrm())
                .eqIfPresent(DsParentPlatformDO::getConnectStatus, reqVO.getConnectStatus())
                .eqIfPresent(DsParentPlatformDO::getParentPlatfromResponse, reqVO.getParentPlatfromResponse())
                .eqIfPresent(DsParentPlatformDO::getParentPlatformJym, reqVO.getParentPlatformJym())
                .eqIfPresent(DsParentPlatformDO::getParentMainLinkStatus, reqVO.getParentMainLinkStatus())
                .eqIfPresent(DsParentPlatformDO::getParentSubLinkStatus, reqVO.getParentSubLinkStatus())
                .eqIfPresent(DsParentPlatformDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(DsParentPlatformDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DsParentPlatformDO::getId));
    }

}